<?php 

$this->headScript()
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.core.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.widget.js")
		->appendFile($this->baseUrl()."/js/jquery/development-bundle/ui/jquery.ui.button.js");
$this->headLink()->appendStylesheet($this->baseUrl(). '/js/jquery/development-bundle/themes/ui-lightness/jquery.ui.all.css');
$this->headTitle('Fabricantes');
?>
<div class="section table_section">

<div class="section_inner">
	<div class="title_wrapper">
		<h2>Fabricantes / Marcas</h2>
	</div>
	<div class="section_content">
	<p class="errorText">&nbsp;<?php echo $this->messageError; ?></p>
	<div  id="product_list">
	<!--[if !IE]>start table_wrapper<![endif]-->
	<div class="table_wrapper">
		<div class="table_wrapper_inner">
		<table cellpadding="0" cellspacing="0" width="100%">
			<tbody><tr>
				<th>ID</th>
				<th class="photo"><span>Imagen</span></th>
				<th>Fabricante</th>
				<th>Url</th>
				<th>Acciones</th>
			</tr>
<?php 
$class="";
$i=1;
			foreach ($this->Manufacturers AS $dat){
			$class=($i%2==0) ? "second" : "first";	
?>
			<tr class="<?php echo $class; ?>">
				<td class="first_td" style="width: 26px;"><?php echo $dat['Id'];?></td>
				<td class="photo">
					<a href="#" class="product_thumb">
						<img src="<?php echo $this->baseUrl(); ?>/images/files/manufacturer/Thumb/<?php echo $dat['Thumb'];?>" alt="" width="44" height="31" />
					</a>
				</td>
				<td>
					<a href="<?php echo $this->baseUrl(); ?>/admin/manufacturers/add/Id/<?php echo $dat['Id'];?>/" class="product_name">
						<?php echo (isset($dat['Manufacturer'])) ? $dat['Manufacturer'] : '&nbsp;&nbsp;'; ?>
					</a>
				</td>
				<td>
					<?php echo (isset($dat['Url'])) ? $dat['Url'] : '&nbsp;&nbsp;'; ?>
				</td>
				<td style="width: 120px;">
					<div class="actions_menu">
						<ul>
							
							<li><a class="edit" href="<?php echo $this->baseUrl(); ?>/admin/manufacturers/add/Id/<?php echo $dat['Id'];?>/">editar</a></li>
							<li><a class="delete" href="<?php echo $this->baseUrl(); ?>/admin/manufacturers/delete/Id/<?php echo $dat['Id'];?>/">Eliminar</a></li>
						</ul>
					</div>
				</td>
			</tr>
<?php } ?>			
			
			
		</tbody>
		</table>
		</div>
	</div>
	<!--[if !IE]>end table_wrapper<![endif]-->
	</div>
	
<?php echo $this->paginationControl($this->Manufacturers, 'Sliding', 'pagination.phtml'); ?>
			
		</div>
	</div>


<a href="<?php echo $this->baseUrl(); ?>/admin/manufacturers/add/"  class="buttonyui">
	Agregar fabricante
</a>&nbsp;
</div>	

<script type="text/javascript">
$(document).ready(function(){
	$( ".buttonyui").button();
});
</script>		